import { createApp } from 'vue'
import { createPinia } from 'pinia'
import ElementPlus from 'element-plus';
import request from './utils/request'; // 导入 axios 实例
import * as ElementPlusIconsVue from '@element-plus/icons-vue'; // 导入所有图标组件



import 'element-plus/dist/index.css';
import App from './App.vue'
import router from './router'


const app = createApp(App)

// 全局注册所有图标组件
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

// 将 axios 实例挂载到 Vue 全局属性
app.config.globalProperties.$axios = request;
app.use(ElementPlus);
app.use(createPinia())
app.use(router)

app.mount('#app')
